continuity of piecewise functions